home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / newsgroups / misc.20041116-20060924 / 000364_toastyboy@googlemail.com_Thu Jun 22 08:55:55 2006.msg < prev    next >
Internet Message Format  |  2006-09-27  |  5KB

  1. Path: newsmaster.cc.columbia.edu!panix!news.linkpendium.com!news.linkpendium.com!news.glorb.com!postnews.google.com!b68g2000cwa.googlegroups.com!not-for-mail
  2. From: toastyboy@googlemail.com
  3. Newsgroups: comp.protocols.kermit.misc
  4. Subject: Re: Assigning output from LINEOUT to a variable
  5. Date: 21 Jun 2006 11:00:03 -0700
  6. Organization: http://groups.google.com
  7. Lines: 194
  8. Message-ID: <1150912803.713517.155380@b68g2000cwa.googlegroups.com>
  9. References: <1150811644.629253.47720@r2g2000cwb.googlegroups.com>
  10.    <slrne9g25a.h41.fdc@sesame.cc.columbia.edu>
  11.    <1150816457.938186.136820@r2g2000cwb.googlegroups.com>
  12.    <slrne9ispi.jaj.fdc@sesame.cc.columbia.edu>
  13. NNTP-Posting-Host: 82.32.88.179
  14. Mime-Version: 1.0
  15. Content-Type: text/plain; charset="iso-8859-1"
  16. X-Trace: posting.google.com 1150912809 20217 127.0.0.1 (21 Jun 2006 18:00:09 GMT)
  17. X-Complaints-To: groups-abuse@google.com
  18. NNTP-Posting-Date: Wed, 21 Jun 2006 18:00:09 +0000 (UTC)
  19. In-Reply-To: <slrne9ispi.jaj.fdc@sesame.cc.columbia.edu>
  20. User-Agent: G2/0.2
  21. X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe)
  22. Complaints-To: groups-abuse@google.com
  23. Injection-Info: b68g2000cwa.googlegroups.com; posting-host=82.32.88.179;
  24.    posting-account=9CvZkQ0AAABEiymyFVJPVVB65tz-PEMS
  25. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:15621
  26.  
  27. Frank!!
  28.  
  29. That's great!  Starting to make sense now, I've used LINEOUT rather
  30. than send the carriage return at the end, but thanks for explaining
  31. I've been stuck on this for weeks - even ordered the kermit manual from
  32. amazon.com! :-)  ...should be useful anyway I guess.
  33.  
  34. Bad news is that I still have my original problem (which I probably
  35. didn't explain to start with) with my *all new* script the performance
  36. is awesome so that's good, my garage lights come on immediately that I
  37. open the door and the front door chimes much earlier than it used to,
  38. from moving from a shell script calling kermit, to a kermit script I
  39. reckon has increased performance by 500% easily, so that's great.
  40.  
  41. However, what i had always had problems with was that over time my
  42. server would run out of memory and grind to a halt, even with my new
  43. script I'm getting the same problem.
  44.  
  45. Is it possible that my kermit script needs to flush buffers or
  46. inputs/outputs each time it cycles?
  47.  
  48. The script is included below (it's quite long)
  49.  
  50. #!/u01/bin/kermit +
  51.  
  52. set line /dev/ttyS5
  53. set speed 9600
  54. set stop-bits 1
  55. set parity none
  56. set flow-control none
  57. SET CARRIER-WATCH OFF
  58. open line /dev/ttyS5
  59.  
  60. while true {
  61.  
  62. OPEN READ /u01/status/OUT11
  63. READ \%a
  64. close read-file
  65. OPEN READ /u01/status/OUT12
  66. READ \%b
  67. close read-file
  68. OPEN READ /u01/status/OUT13
  69. READ \%c
  70. close read-file
  71. OPEN READ /u01/status/OUT14
  72. READ \%d
  73. close read-file
  74. OPEN READ /u01/status/OUT15
  75. READ \%e
  76. close read-file
  77. OPEN READ /u01/status/OUT16
  78. READ \%f
  79. close read-file
  80. OPEN READ /u01/status/OUT17
  81. READ \%g
  82. close read-file
  83. OPEN READ /u01/status/OUT18
  84. READ \%h
  85. close read-file
  86.  
  87. if ( == \%a 0 ) {
  88.         LINEOUT F1
  89.         INPUT 1 F1
  90.         INPUT 1 \"#\"
  91. } else {
  92.         LINEOUT N1
  93.         INPUT 1 N1
  94.         INPUT 1 \"#\"
  95. }
  96.  
  97. if ( == \%b 0 ) {
  98.         LINEOUT F2
  99.         INPUT 1 F2
  100.         INPUT 1 \"#\"
  101. } else {
  102.         LINEOUT N2
  103.         INPUT 1 N2
  104.         INPUT 1 \"#\"
  105. }
  106. if ( == \%c 0 ) {
  107.         LINEOUT F3
  108.         INPUT 1 F3
  109.         INPUT 1 \"#\"
  110. } else {
  111.         LINEOUT N3
  112.         INPUT 1 N3
  113.         INPUT 1 \"#\"
  114. }
  115. if ( == \%d 0 ) {
  116.         LINEOUT F4
  117.         INPUT 1 F4
  118.         INPUT 1 \"#\"
  119. } else {
  120.         LINEOUT N4
  121.         INPUT 1 N4
  122.         INPUT 1 \"#\"
  123. }
  124. if ( == \%e 0 ) {
  125.         LINEOUT F5
  126.         INPUT 1 F5
  127.         INPUT 1 \"#\"
  128. } else {
  129.         LINEOUT N5
  130.         INPUT 1 N5
  131.         INPUT 1 \"#\"
  132. }
  133. if ( == \%f 0 ) {
  134.         LINEOUT F6
  135.         INPUT 1 F6
  136.         INPUT 1 \"#\"
  137. } else {
  138.         LINEOUT N6
  139.         INPUT 1 N6
  140.         INPUT 1 \"#\"
  141. }
  142. if ( == \%g 0 ) {
  143.         LINEOUT F7
  144.         INPUT 1 F7
  145.         INPUT 1 \"#\"
  146. } else {
  147.         LINEOUT N7
  148.         INPUT 1 N7
  149.         INPUT 1 \"#\"
  150. }
  151.  
  152. if ( == \%h 0 ) {
  153.         LINEOUT F8
  154.         INPUT 1 F8
  155.         INPUT 1 \"#\"
  156. } else {
  157.         LINEOUT N8
  158.         INPUT 1 N8
  159.         INPUT 1 \"#\"
  160. }
  161.  
  162. LINEOUT I1
  163. INPUT 1 I1
  164. MINPUT 1 1 0
  165. .\%n := \v(minput)
  166. if ( == \%n 1 ) {
  167.         RUN (echo 1 > /u01/status/IN11)
  168. } else {
  169.         RUN (echo 0 > /u01/status/IN11)
  170. }
  171.  
  172. INPUT 1 \"#\"
  173. LINEOUT I2
  174. INPUT 1 I2
  175. MINPUT 1 1 0
  176. .\%o := \v(minput)
  177. if ( == \%o 1 ) {
  178.         RUN (echo 1 > /u01/status/IN12)
  179. } else {
  180.         RUN (echo 0 > /u01/status/IN12)
  181. }
  182.  
  183. INPUT 1 \"#\"
  184. LINEOUT I3
  185. INPUT 1 I3
  186. MINPUT 1 1 0
  187. .\%p := \v(minput)
  188. if ( == \%p 1 ) {
  189.         RUN (echo 1 > /u01/status/IN13)
  190. } else {
  191.         RUN (echo 0 > /u01/status/IN13)
  192. }
  193.  
  194. INPUT 1 \"#\"
  195. LINEOUT I4
  196. INPUT 1 I4
  197. MINPUT 1 1 0
  198. .\%q := \v(minput)
  199. if ( == \%q 1 ) {
  200.         RUN (echo 1 > /u01/status/IN14)
  201. } else {
  202.         RUN (echo 0 > /u01/status/IN14)
  203. }
  204. INPUT 1 \"#\"
  205.  
  206. clear input
  207. }
  208. quit
  209.  
  210.  
  211.  
  212.  
  213. Now that my script is running more often i'm running out of memory even
  214. quicker than before, so I'm fairly sure that it's kermit causing my
  215. problems (although I'm sure it's my poor scripting and not kermit's
  216. fault)
  217.  
  218. Thanks to all again
  219. -Dan McGrath
  220.